From: Keir Fraser Date: Wed, 1 Apr 2009 10:44:49 +0000 (+0100) Subject: xend: allow hvm domain to have multiple serial consoles X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~13989^2~26 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22Dat/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22Dat?a=commitdiff_plain;h=c6d5b4e310e8c725bd752470b5c85b00dc0685aa;p=xen.git xend: allow hvm domain to have multiple serial consoles This patch allows hvm domain to have multiple serial ports with serial =3D [ '...', '...']. The old style, serial=3D'option string', is also accepted for compatibility. Signed-off-by: Isaku Yamahata --- diff --git a/tools/python/xen/xend/image.py b/tools/python/xen/xend/image.py index 239165b55f..14b46fd586 100644 --- a/tools/python/xen/xend/image.py +++ b/tools/python/xen/xend/image.py @@ -781,6 +781,14 @@ class HVMImageHandler(ImageHandler): if v: ret.append("-%s" % a) except (ValueError, TypeError): pass # if we can't convert it to a sane type, ignore it + elif a == 'serial': + if v: + if type(v) == str: + v = [v] + for s in v: + if s: + ret.append("-serial") + ret.append("%s" % s) else: if v: ret.append("-%s" % a)